<template>
  <button @click="toUrl()">跳转</button>
</template>
<script>
var wx = require("weixin-js-sdk");
export default {
  methods: {
    toUrl() {
      wx.miniProgram.getEnv(function (result) {
        if (result.miniprogram) {
          wx.miniProgram.reLaunch({
            url: "/pages/home/home",
          });
        }
      });
    },
  },
};
</script>
<style lang="less" scoped>
</style>